'use strict';

var commonModels = angular.module('commonModels');

commonModels.factory('StoreOpt', ['$resource', 'Constant', function($resource, Constant){
    return $resource(Constant.ApiPath + 'storeOpt/:action', {}, {
        opt: {method:'GET', params:{action: true, subId: true}}
    });
}]);
commonModels.factory('Store', ['$resource', 'Constant', function($resource, Constant){
    return $resource(Constant.ApiPath + 'store/:storeId', {productId:'@id'}, {

    });
}]);

commonModels.factory('CategoryOpt', ['$resource', 'Constant', function($resource, Constant){
    return $resource(Constant.ApiPath + 'categoryOpt/:action', {}, {
        opt: {method:'GET', params:{action: true, subId: true}}
    });
}]);
commonModels.factory('Category', ['$resource', 'Constant', function($resource, Constant){
    return $resource(Constant.ApiPath + 'category/:categoryId', {categoryId:'@id'}, {

    });
}]);

commonModels.factory('ProductOpt', ['$resource', 'Constant', function($resource, Constant){
    return $resource(Constant.ApiPath + 'productOpt/:action', {}, {
        opt: {method:'GET', params:{action: true, categoryId: true}}
    });
}]);
commonModels.factory('Product', ['$resource', 'Constant', function($resource, Constant){
    return $resource(Constant.ApiPath + 'product/:productId', {productId:'@id'}, {

    });
}]);
